[IA64] Remove init_task definition
authorAlex Williamson <alex.williamson@hp.com>
Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)
init_task in kernel area shouldn't be referenced.
The corresponding address in the identity mapping area should be used.
i.e. ia64_tpa(init_task) + PAGE_OFFSET, because ia64_switch_rr7() and
vmx_switch_rr7() assume that stack is in indentity mapping area.
To make it sure, remove init_task definition.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/arch/ia64/linux-xen/head.S
xen/arch/ia64/xen/idle0_task.c

index 8e265585cb376a40e25316dd0fe2b2372e88b4a9..270bd92d4e83a12c285e19376549998423a9d694 100644 (file)
@@ -311,6 +311,10 @@ start_ap:
 #define isAP   p2      // are we an Application Processor?
 #define isBP   p3      // are we the Bootstrap Processor?
 
+#ifdef XEN
+# define init_task     init_task_mem
+#endif
+
 #ifdef CONFIG_SMP
        /*
         * Find the init_task for the currently booting CPU.  At poweron, and in
index da6e1c629d18c8d66b2e98e46e7cf736b1fc94d7..0708f7d385ab31f455a110d02a47b1c9e7b7dd0e 100644 (file)
 /*
  * Initial task structure.
  *
- * We need to make sure that this is properly aligned due to the way process stacks are
- * handled. This is done by having a special ".data.init_task" section...
+ * We need to make sure that this is properly aligned due to the way process
+ * stacks are handled.
+ * This is done by having a special ".data.init_task" section...
+ *
+ * init_task_mem shouldn't be used directly. the corresponding address in
+ * the identity mapping area should be used.
+ * I.e. __va(ia64_tpa(init_task_mem)) should be used.
  */
 union {
        struct {
                struct vcpu task;
        } s;
        unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
-} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{
+} init_task_mem __attribute__((section(".data.init_task"))) = {{
        .task = IDLE_VCPU(init_task_mem.s.task)
 }};
-
-EXPORT_SYMBOL(init_task);
-